package com.ncwu.interfaces.dto;

import lombok.Data;

@Data
//封装返回结果的类
public class Result<T> {

    private int code;
    private String msg;
    private T data;


    public Result() {
        this.code = 200;
        this.msg = "ok!";
    }


    public Result(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }


    public Result(T data) {
        this.data = data;
        this.code = 200;
        this.msg = "ok!";
    }


    public Result(T data, String msg) {
        this.data = data;
        this.code = 200;
        this.msg = msg;
    }

}